package wifiunion.com.notice.presenter;

import android.content.Context;


import java.util.HashMap;

import wifiunion.com.notice.Constants;
import wifiunion.com.notice.NoticeContact;
import wifiunion.com.notice.model.UpdateNoticeGroupModel;

/**
 * Created by Administrator on 2017/2/22.
 */

public class UpdateNoticeGroupPresenter implements NoticeContact.Presenter,NoticeContact.Callback {

    private NoticeContact.UpdategroupView mView;
    private Context mContext;
    private UpdateNoticeGroupModel mModel;



    public UpdateNoticeGroupPresenter(Context context, NoticeContact.UpdategroupView view) {
        mView = view;
        mContext = context;
        mModel = new UpdateNoticeGroupModel();
        mView.setPresenter(this);
    }


    @Override
    public void onSuccess(Object data) {

        mView.onUpdateNoticeGroupSuccess();
    }

    @Override
    public void onServerFailed(Object errorObj) {
        mView.onUpdateNoticeGroupFailed();
    }

    @Override
    public void onNetFailed() {
        mView.onUpdateNoticeGroupFailed();
    }

    @Override
    public void start() {

    }

    @Override
    public void start(HashMap<String, Object> param1s) {
        mModel.loadData(Constants.HTTP_URL_POST_UPDATENOTICEGROUP, param1s, this);

    }
}